feat: add get_model_presets and get_prompting_guide discovery tools#25
Merged
hybridindie merged 4 commits intomainfrom Mar 12, 2026
Merged
Conversation
Closes #18 - Add get_model_presets(model_name|model_family) with family normalization, filename-based inference, and curated recommended generation settings. - Add get_prompting_guide(model_family) with model-family prompt structure, weighting guidance, quality tags, and negative prompt tips. - Apply read limiter and audit logging to both tools. - Add tests for family lookup, inference, validation, and guide retrieval. - Document new tools in README discovery table.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
You can also share your feedback on Copilot code review. Take the survey.
59e7daa to
1678a8e
Compare
Closes #18 - Add get_model_presets(model_name|model_family): family normalization, filename-based inference, and curated recommended generation settings. - Add get_prompting_guide(model_family): prompt structure, weight syntax, quality tags, and negative prompt tips per model family. - Apply read limiter and audit logging to both tools. - Removed redundant self-mapping aliases (sdxl, flux) from alias table. - Explicit ValueError when model filename is unrecognized (None guard). - 6 new tests covering family lookup, inference, validation, guide retrieval, unknown-family rejection, and unrecognized filename rejection. - Document new tools in README discovery table. Co-authored-by: hybridindie <20465+hybridindie@users.noreply.github.com>
Co-authored-by: hybridindie <20465+hybridindie@users.noreply.github.com>
Copilot
AI
changed the title
feat: add model presets and prompting guide tools
feat: add get_model_presets and get_prompting_guide discovery tools
Mar 12, 2026
hybridindie
pushed a commit
that referenced
this pull request
Mar 12, 2026
- Add negative TTL (5 min) to ModelManagerDetector so a late-starting Model Manager is detected without requiring server restart (#13) - Add path injection prevention tests for prompt_id, node_class, task_id, and HTTP method validation (#19) - Rewrite integration tests to use register_*_tools() return dicts instead of accessing private _tool_manager._tools SDK attrs (#20) - Gate Docker image push on test/lint job success via needs: (#22) - Fix docker-compose volume paths for non-root container user (#23) - Document SSE transport security risks with warning callout (#24) - Add audit vs enforce mode operational guidance table (#25) - Add audit log rotation docs with logrotate example (#26) - Remove duplicate row in threat model table (#52) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
hybridindie
pushed a commit
that referenced
this pull request
Mar 12, 2026
- Add negative TTL (5 min) to ModelManagerDetector so a late-starting Model Manager is detected without requiring server restart (#13) - Add path injection prevention tests for prompt_id, node_class, task_id, and HTTP method validation (#19) - Rewrite integration tests to use register_*_tools() return dicts instead of accessing private _tool_manager._tools SDK attrs (#20) - Gate Docker image push on test/lint job success via needs: (#22) - Fix docker-compose volume paths for non-root container user (#23) - Document SSE transport security risks with warning callout (#24) - Add audit vs enforce mode operational guidance table (#25) - Add audit log rotation docs with logrotate example (#26) - Remove duplicate row in threat model table (#52) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two static, read-only discovery tools so LLMs can retrieve model-family-specific generation presets and prompt engineering guidance without needing to know ComfyUI internals.
Changes
get_model_presets(model_name?, model_family?)— returns recommended sampler, scheduler, steps, CFG, resolution, and clip_skip for a given family. Accepts explicit family name (sd15,sdxl,flux,sd3,cascade) or infers from model filename (e.g.flux1-dev-fp8.safetensors→flux). Normalizes common aliases (sd1.5,flux.1,sd3.5,stable-diffusion-xl, etc.).get_prompting_guide(model_family)— returns prompt structure, weight syntax, quality tags, and negative-prompt tips per family.Both tools call
limiter.check()first and emit structuredaudit.log()entries. No API calls to ComfyUI — static data only._MODEL_FAMILY_ALIASEScleaned up: removed redundant self-mapping entries (sdxl,flux,sd3). Added explicitNoneguard after filename inference with a clear error rather than a misleading "Unknown model family: None".6 new tests in
TestModelPresetsAndGuidescovering direct lookup, filename inference, missing-input rejection, guide retrieval, unknown-family rejection, and unrecognized-filename rejection.README discovery table updated with both tools.
Example
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.